package fr.umlv.m2.uwp2011.web.client.professor;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.RichTextArea;
import com.google.gwt.user.client.ui.VerticalPanel;

import fr.umlv.m2.uwp2011.web.client.Session;
import fr.umlv.m2.uwp2011.web.client.common.RichTextToolbar;

public class ProfessorTeachingEditor extends Composite {

	/**
	 * The page panel.
	 */
	private VerticalPanel pagePanel;

	/**
	 * The main panel.
	 */
	private final VerticalPanel page;

	public ProfessorTeachingEditor(Session session) {
		this.pagePanel = new VerticalPanel();
		this.page = new VerticalPanel();
		
	    // Create the text area and toolbar
	    RichTextArea area = new RichTextArea();
	    area.setSize("100%", "40em");

	    RichTextToolbar toolbar = new RichTextToolbar(area);
	    toolbar.setWidth("100%");
		
		pagePanel.add(toolbar);
		pagePanel.add(area);	
		this.page.add(pagePanel);
		this.initWidget(page);
	}

}
